package com.example.sqlitedemo;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface UserDao {
    @Query("SELECT * FROM user")
    List<User>  getAll();
    @Query("SELECT * FROM user WHERE user_name LIKE:last")
    User findByName(String last);

    @Insert
    void insertAll(User user);
    @Delete
    void delete(User user);
}
